<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
function encrypt($str, $screct_key)
{
    $screct_key = base64_decode($screct_key);
    $str = trim($str);
    $str = addPKCS7Padding($str);
    $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
    $iv = str_repeat("\0", $iv_size);
    $encrypt_str = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $screct_key, $str, MCRYPT_MODE_CBC, $iv);
    return base64_encode($encrypt_str);
}
function decrypt($str, $screct_key)
{
    $str = base64_decode($str);
    $screct_key = base64_decode($screct_key);
    $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
    $iv = str_repeat("\0", $iv_size);
    $decrypt_str = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $screct_key, $str, MCRYPT_MODE_CBC, $iv);
    $decrypt_str = stripPKSC7Padding($decrypt_str);
    return $decrypt_str;
}
function addPKCS7Padding($source)
{
    $source = trim($source);
    $block = mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
    $pad = $block - strlen($source) % $block;
    if($pad <= $block) {
        $char = chr($pad);
        $source .= str_repeat($char, $pad);
    }
    return $source;
}
function stripPKSC7Padding($source)
{
    $char = substr($source, -1);
    $num = ord($char);
    if($num == 62) {
        return $source;
    }
    $source = substr($source, 0, -1 * $num);
    return $source;
}

?>